{include file="pub_header.htm"}
<div class="out_table">
<table width="100%" cellpadding="6" cellspacing="6" border="0" align="center" class="frame_table">
  <tr>
    <td width="20%" align="center" valign="top" bgcolor="#EEEEEE">
      {include file="pub_submenu.htm"}
    </td>
    <td width="80%" align="center" valign="top" bgcolor="#FFFFFF">

      {if $get.ope == "add"}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=language" target="_self" class="current_place">前台语言管理</a>
            &raquo; <a href="{$control_admin}?act=language&ope=add&pag={$get.pag}" target="_self" class="current_place">添加前台语言</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=language&pag={$get.pag}" target="_self" class="current_place">前台语言列表</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <form id="language_add" name="language_add" method="post" action="javascript:void(null);" enctype="multipart/form-data">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="3">添加前台语言</td>
        </tr>
        <tr align="left">
          <td width="20%" class="block_left">名称</td>
          <td width="40%" class="block_right"><input type="text" id="name" name="name" maxlength="30" size="50" value="" class="input"></td>
          <td width="40%" class="block_right"><span id="name_return"><span class="prompt_primal">如:Chinese simplified</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">简介</td>
          <td class="block_right"><textarea id="brief" name="brief" rows="6" cols="50" class="textarea"></textarea></td>
          <td class="block_right"><span id="brief_return"><span class="prompt_primal">对此语言的简介</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">代码</td>
          <td class="block_right"><input type="text" id="code" name="code" maxlength="30" size="50" value="" class="input"></td>
          <td class="block_right"><span id="code_return"><span class="prompt_primal">如:cn</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">图标</td>
          <td class="block_right"><input type="text" id="icon" name="icon" maxlength="255" size="50" value="" class="input"></td>
          <td class="block_right"><span id="icon_return"><span class="prompt_primal">如:cn.gif,位置:[language/目录/]</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">目录</td>
          <td class="block_right"><input type="text" id="dir" name="dir" maxlength="255" size="50" value="" class="input"></td>
          <td class="block_right"><span id="dir_return"><span class="prompt_primal">如:chinese_simplified,位置:[language/]</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">排序</td>
          <td class="block_right"><input type="text" id="rank" name="rank" maxlength="11" size="50" value="" class="input"></td>
          <td class="block_right"><span id="rank_return"><span class="prompt_primal">排序</span></span></td>
        </tr>
        <tr>
          <td colspan="3" align="center" class="block_footer">
          <input type="button" id="language_submit" name="language_submit" value="添加" class="button"
            onclick="xajax.$('language_submit').disabled=true;
                     xajax.$('language_submit').value='请等待...';
                     xajax_submit_form('add',xajax.getFormValues('language_add'),'language_submit');">
          </td>
        </tr>
      </table>
      </form>
      </div>
      {elseif $get.ope == "amend"}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=language" target="_self" class="current_place">前台语言管理</a>
            &raquo; <a href="{$control_admin}?act=language&ope=amend$mid={$get.mid}&pag={$get.pag}" target="_self" class="current_place">编辑前台语言</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=language&pag={$get.pag}" target="_self" class="current_place">前台语言列表</a>
            <a href="{$control_admin}?act=language&ope=add&pag={$get.pag}" target="_self" class="current_place">添加前台语言</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <form id="language_amend" name="language_amend" method="post" action="javascript:void(null);" enctype="multipart/form-data">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="3">编辑前台语言</td>
        </tr>
        <tr align="left">
          <td width="20%" class="block_left">ID</td>
          <td width="40%" class="block_right">{$language_detail.id}</td>
          <td width="40%" class="block_right"></td>
        </tr>
        <tr align="left">
          <td class="block_left">名称</td>
          <td class="block_right"><input type="text" id="name" name="name" maxlength="30" size="50" value="{$language_detail.name|str_entag}" class="input"></td>
          <td class="block_right"><span id="name_return"><span class="prompt_primal">如:Chinese simplified</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">简介</td>
          <td class="block_right"><textarea id="brief" name="brief" rows="6" cols="50" class="textarea">{$language_detail.brief|str_entag}</textarea></td>
          <td class="block_right"><span id="brief_return"><span class="prompt_primal">对此语言的简介</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">代码</td>
          <td class="block_right"><input type="text" id="code" name="code" maxlength="30" size="50" value="{$language_detail.code}" class="input"></td>
          <td class="block_right"><span id="code_return"><span class="prompt_primal">如:cn</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">图标</td>
          <td class="block_right"><input type="text" id="icon" name="icon" maxlength="255" size="42" value="{$language_detail.icon}" class="input"> <img src="language/{$language_detail.dir}/{$language_detail.icon}" border="0" alt="{$language_detail.icon}" align="absmiddle" /></td>
          <td class="block_right"><span id="icon_return"><span class="prompt_primal">如:cn.gif,位置:[language/目录/]</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">目录</td>
          <td class="block_right"><input type="text" id="dir" name="dir" maxlength="255" size="50" value="{$language_detail.dir}" class="input"></td>
          <td class="block_right"><span id="dir_return"><span class="prompt_primal">如:chinese_simplified,位置:[language/]</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">排序</td>
          <td class="block_right"><input type="text" id="rank" name="rank" maxlength="11" size="50" value="{$language_detail.rank}" class="input"></td>
          <td class="block_right"><span id="rank_return"><span class="prompt_primal">排序</span></span></td>
        </tr>
        <tr>
          <td colspan="3" align="center" class="block_footer">
          <input type="button" id="language_submit" name="language_submit" value="编辑" class="button"
            onclick="xajax.$('language_submit').disabled=true;
                     xajax.$('language_submit').value='请等待...';
                     xajax_submit_form('amend',xajax.getFormValues('language_amend'),'language_submit');">
          </td>
        </tr>
      </table>
      </form>
      </div>
      {else}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=language" target="_self" class="current_place">前台语言管理</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=language&ope=add&pag={$get.pag}" target="_self" class="current_place">添加前台语言</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="7">前台语言列表</td>
        </tr>
        <tr class="block_title">
          <td width="5%">ID</td>
          <td width="30%" align="left">名称</td>
          <td width="10%">代码</td>
          <td width="15%">图标</td>
          <td width="20%" align="left">目录</td>
          <td width="10%">排序</td>
          <td width="10%">操作</td>
        </tr>
        {foreach name=language_list from=$language_list key=key item=item}
        <tr align="center" class="block_list" onmouseover="this.className='block_list_over'" onmouseout="this.className='block_list'">
          <td>{$item.id}</td>
          <td align="left"><span title="{$item.brief|str_entag:'space,br'}">{$item.name|str_entag:'space,br'}</span></td>
          <td>{$item.code}</td>
          <td><img src="language/{$item.dir}/{$item.icon}" border="0" alt="{$item.icon}" /></td>
          <td align="left">{$item.dir}</td>
          <td>{$item.rank}</td>
          <td class="right_table_control">
            <a href="{$control_admin}?act=language&ope=amend&language_id={$item.id}&pag={$get.pag}" target="_self"><img src="{$dir_images_admin}/icon_edit.gif" border="0" alt="改" title="修改" /></a>
            <a href="{$control_admin}?act=language&ope=del&language_id={$item.id}&pag={$get.pag}" target="_self" onClick="return confirm('真的要删除记录?')"><img src="{$dir_images_admin}/icon_delete.gif" border="0" alt="删" title="删除记录"></a>
          </td>
        </tr>
        {/foreach}
      </table>
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center">
        <tr>
          <td align="left">&nbsp;</td>
          <td align="right">
            <span class="pagination_post_list">
              <span class="pagelink_side" title="Total record{$pagination.record_total}">{$pagination.record_total}</span>
              <span class="pagelink_side" title="Current page{$pagination.page_current}/Page{$pagination.page_total}"><font color="#EA7408">{$pagination.page_current}</font>/{$pagination.page_total}</span>
              {if $pagination.page_listbegin != ""}<span class="pagelink_side" title="Go to first page"><a href="{$pagination.url|print_format:$pagination.page_listbegin}" target="_self" class="pagehref">&laquo;</a></span>{/if}
              {if $pagination.page_listbegin_more != ""}<span class="pagelink_side" title="Jump {$pagination.page_listnum/2|@floor} page"><a href="{$pagination.url|print_format:$pagination.page_listbegin_more}" target="_self" class="pagehref">...</a></span>{/if}
              {if $pagination.page_previous != ""}<span class="pagelink_side" title="Previous page"><a href="{$pagination.url|print_format:$pagination.page_previous}" target="_self" class="pagehref">&#8249;</a></span>{/if}
              {foreach name=page_list from=$pagination.page_list item=page_list}
                {if $page_list.if_current == "1"}
                  <span class="pagelink_current" title="Current page{$page_list.page}"><font color="#EA7408">{$page_list.page}</font></span>
                {else}
                  <span class="pagelink" title="{$page_list.page}"><a href="{$pagination.url|print_format:$page_list.page}" target="_self" class="pagehref">{$page_list.page}</a></span>
                {/if}
              {/foreach}
              {if $pagination.page_next != ""}<span class="pagelink_side" title="Next page"><a href="{$pagination.url|print_format:$pagination.page_next}" target="_self" class="pagehref">&#8250;</a></span>{/if}
              {if $pagination.page_listend_more != ""}<span class="pagelink_side" title="Jump {$pagination.page_listnum/2|@floor} page"><a href="{$pagination.url|print_format:$pagination.page_listend_more}" target="_self" class="pagehref">...</a></span>{/if}
              {if $pagination.page_listend != ""}<span class="pagelink_side" title="Go to last page"><a href="{$pagination.url|print_format:$pagination.page_listend}" target="_self" class="pagehref">&raquo;</a></span>{/if}
              <select onchange="self.location.href=this.options[this.selectedIndex].value" class="select">
              {if $pagination.page_selectbegin != ""}<option value="{$pagination.url|print_format:$pagination.page_selectbegin}">{$pagination.page_selectbegin}</option>{/if}
              {if $pagination.page_selectbegin_more != ""}<option value="{$pagination.url|print_format:$pagination.page_selectbegin_more}">...</option>{/if}
              {foreach name=page_select from=$pagination.page_select item=page_select}
                {if $page_select.if_current == "1"}
                  <option value="{$pagination.url|print_format:$page_select.page}" selected="selected">{$page_select.page}</option>
                {else}
                  <option value="{$pagination.url|print_format:$page_select.page}">{$page_select.page}</option>
                {/if}
              {/foreach}
              {if $pagination.page_selectend_more != ""}<option value="{$pagination.url|print_format:$pagination.page_selectend_more}">...</option>{/if}
              {if $pagination.page_selectend != ""}<option value="{$pagination.url|print_format:$pagination.page_selectend}">{$pagination.page_selectend}</option>{/if}
              </select>
            </span>
          </td>
        </tr>
      </table>
      </div>
      {/if}

    </td>
  </tr>
</table>
{include file="pub_footer.htm"}